package com.ibeeking.found.upms.s.rest.service;

import com.ibeeking.found.common.entity.CurrentUser;
import com.ibeeking.found.upms.service.common.bo.ShopUserRoleBO;
import com.ibeeking.found.upms.service.common.param.RoleUserParam;
import com.ibeeking.found.upms.service.common.param.UserRoleParam;

import java.util.List;

/**
 * @ClassName IShopUserRoleService
 * @Description
 * @Author ibeeking
 * @Date 2021-02-22 9:32
 **/
public interface IShopUserRoleService {

    /**
     * 通过用户Id查询角色ids
     *
     * @param shopId
     * @param userId
     * @return
     */
    List<ShopUserRoleBO> queryRoleIdsByUserId(Long shopId, Long userId);

    /**
     * 通过角色ids查询关系
     *
     * @param shopId
     * @param roleIds
     * @return
     */
    List<ShopUserRoleBO> queryUserRoleByRoleIds(Long shopId, List<Long> roleIds);

    /**
     * 通过用户Id关联角色
     *
     * @param currentUser
     * @param userRoleParam
     * @return
     */
    Boolean modifyUserRoleByUserId(CurrentUser currentUser, UserRoleParam userRoleParam);

    /**
     * 通过角色Id关联用户
     *
     * @param currentUser
     * @param roleUserParam
     * @return
     */
    Boolean modifyUserRoleByRoleId(CurrentUser currentUser, RoleUserParam roleUserParam);

    /**
     *
     * @param shopId
     * @param userIds
     * @return
     */
    List<ShopUserRoleBO> queryRoleIdsByUserIds(Long shopId, List<Long> userIds);

}
